package com.jzbooks.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author mingPeng
 * @date 2021/4/27 15:29
 * @Description : 用户类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("用户类")
@TableName(value = "user")
public class User extends BaseEntity{

    @ApiModelProperty("学号或者工号")
    @TableField(value = "user_id")
    private Integer userId;

    @ApiModelProperty("密码")
    @TableField(value = "password")
    private String password;

    @ApiModelProperty("姓名")
    @TableField(value = "name")
    private String name;

    @ApiModelProperty("性别，0男，1女")
    @TableField(value = "sex")
    private Byte sex;

    @ApiModelProperty("手机号")
    @TableField(value = "phone_num")
    private Integer phoneNum;

    @ApiModelProperty("学院")
    @TableField(value = "college")
    private String college;

    @ApiModelProperty("班级")
    @TableField(value = "classe")
    private String classe;

    @ApiModelProperty("邮箱号")
    @TableField(value = "email")
    private String email;

    @ApiModelProperty("头像地址")
    @TableField(value = "img_src")
    private String imgSrc;

    @ApiModelProperty("0老师,1学生")
    @TableField(value = "user_type")
    private Byte userType;

    @ApiModelProperty("逻辑删除")
    @TableField(value = "deleted")
    @TableLogic
    private Integer deleted;


    public static final String COL_USERNAME = "user_id";

    public static final String COL_PASSWORD = "password";

    public static final String COL_NAME = "name";

    public static final String COL_SEX = "sex";

    public static final String COL_PHONE_NUM = "phone_num";

    public static final String COL_CLASSE = "classe";

    public static final String COL_EMAIL = "email";

    public static final String COL_IMG_SRC = "img_src";

    public static final String COL_USER_TYPE = "user_type";

    public static final String COL_DELETED = "deleted";


}
